<!--
 * @Description: 自主服务详细页面
 * @Author: Kerwin
 * @Date: 2025-07-25 16:58:06
 * @LastEditTime: 2025-07-25 17:54:15
 * @LastEditors:  Please set LastEditors
-->

<template>
  <view class="container">
    <view class="ql-editor" v-html="itemInfo.content"></view>
  </view>
</template>

<script setup lang="ts">
import { ref, onMounted } from 'vue'
import { onLoad, onReady } from '@dcloudio/uni-app'
//api
import { baseApi } from '@/api'
//工具
import 'quill/dist/quill.core.css'
const itemId = ref(null)
const itemInfo = ref<any>({})
// 获取服务列表
async function getServiceList() {
  const { data } = await baseApi.getproblemList({
    detail: true,
    noPaging: true,
    id: itemId.value
  })
  console.log(data)
  itemInfo.value = data[0]
}

onLoad((option: any) => {
  if (option) {
    itemId.value = option.id
    getServiceList()
  }
})
</script>

<style lang="scss" scoped>
.container {
  padding: 20rpx;
}
</style>
